#include <stdio.h>
void inplace_swap(int *x, int *y);
void reverse_array(int a[],int cnt);
 void main(void)
{
int a[10],n;
int b,len;
printf(" input:");
for(b=0;b<10 && scanf("%d",&a[b]) != NULL ;b++)
{
len++;
}
n=len;
reverse_array(a,len);
printf("output:");
for(b=0;b<n;b++)
{
printf("%d",a[b]);
}
system("pause");
}


void inplace_swap(int *x,int *y)
{
*y=*x^*y;
*x=*x^*y;
*y=*x^*y;
}

void reverse_array(int a[],int cnt)
{
int first , last;
for(first = 0,last = cnt - 1;
first <= last;
first++,last--)
inplace_swap(&a[first],&a[last]);
}
